home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / editor / pagin707.zip / PAGINATE.TXT < prev    next >
Text File  |  1997-08-04  |  81KB  |  2,074 lines

  1. # % PAGINATE.TXT -- documentation for the PAGINATE command
  2. # % Please reformat using "PAGINATE PAGINATE.TXT PAGINATE.DOC /OVERWRITE /-I"
  3. # % (There's a batch file--PAGDOCS.BAT--that does this for you)
  4. # page=60
  5. # adjust
  6. # date="mmm dd, yyyy"
  7. # TITLE CENTER WIDTH=79
  8. ^O%12%                           ^B%3%                         ^A
  9.  
  10. # end
  11. # % The default width (WIDTH=80) is overridden here because some users
  12. # % preferred it smaller but, in general, WIDTH=80 should be wonderful!
  13. # justify width 79
  14. # index "Column headers" "(See also HEADER)" DUMMY
  15. # index "Country settings" "(See Date displays)" DUMMY
  16. # index "END" "(See FOOTER)" DUMMY
  17. # index "END" "(See HEADER)" DUMMY
  18. # index "END" "(See MULTICOLUMN)" DUMMY
  19. # index "END" "(See TITLE)" DUMMY
  20. # index "END" "(See UNIT)" DUMMY
  21. # index "Environmental variables" "(See /ENV parameter)" DUMMY
  22. # index "Environmental variables" "(See SET PAGINATE)" DUMMY
  23. # index "Error messages" "(See also /DEBUG parameter)" DUMMY
  24. # index "Formatting commands" "LENGTH" "(See WIDTH command)" DUMMY
  25. # index "Guthrie, Bruce" "(See also Elsie)" DUMMY
  26. # index "PAGINATE.INI" "(See INI File)" DUMMY
  27. # index "PAGNOASC.INI" "(See Character-translation Table)" DUMMY
  28. # index "Printer" "(See RESET=string)" DUMMY
  29. # index "Printer" "(See SETUP=string)" DUMMY
  30. # index "Indenting" "(See also WRAPBOL=string)" DUMMY
  31. # index "Indenting" "(See also WRAPOOL=string)" DUMMY
  32. # index "INDEX" "(See INCLUDE INDEX)" DUMMY
  33. # index "Left margin" "Changing temporarily" "(See INDENT command)" DUMMY
  34. # index "Left margin" "Changing permanently" "(See MARGIN command)" DUMMY
  35. # index "Length" "Of line" "(See WIDTH command)" DUMMY
  36. # index "Length" "Of page" "(See PAGE command)" DUMMY
  37. # index "LENGTH" "(See WIDTH command)" DUMMY
  38. # index "Lines" "Across page" "(See RULE command)" DUMMY
  39. # index "Missing data values" "(See INMISS=val)" DUMMY
  40. # index "Missing data values" "(See INMISSC=val)" DUMMY
  41. # index "Missing data values" "(See OUTMISS=val)" DUMMY
  42. # index "Missing data values" "(See OUTMISSC=val)" DUMMY
  43. # index "Multicolumn text" "(See MULTICOLUMN command)" DUMMY
  44. # index "Sorting" "Case-insensitive" "(See SORTI=varspec)" DUMMY
  45. # index "Sorting" "Descending" "(See SORTD=varspec)" DUMMY
  46. # index "Source code" "Printing" "(See WRAP command)" DUMMY
  47. # index "Source code" "Printing" "(See WRAPBOL=string)" DUMMY
  48. # index "Source code" "Printing" "(See WRAPEOL=string)" DUMMY
  49. # index "Streamed output" "Printing" "(See WRAP command)" DUMMY
  50. # index "Streamed output" "Printing" "(See WRAPBOL=string)" DUMMY
  51. # index "Streamed output" "Printing" "(See WRAPEOL=string)" DUMMY
  52. # index "SPACING=1" "(See also SINGLE command)" DUMMY
  53. # index "SPACING=2" "(See also DOUBLE command)" DUMMY
  54. # index "SPACING=3" "(See also TRIPLE command)" DUMMY
  55. # index "Widow lines" "(See ADJUST command)" DUMMY
  56. # index "Windows95"
  57. # index "Windows NT"
  58. # index "Long filenames"
  59. WIN95 AND WINNT NOTICE:  As with most DOS-based utilities, this program doesn't
  60. understand the weird subdirectories, long filenames, invalid characters that
  61. are possible under Windows 95 and Windows/NT.  Both operating systems alias
  62. long filenames into names like MYFILE~1.TXT and you will need to specify the
  63. aliased versions of file names to process them.  Under some file structure
  64. systems in NT, the program may not work at all.
  65.  
  66. # index "Overview"
  67. The PAGINATE.EXE program formats text files containing embedded "marker"
  68. commands.  Specifically, the program can be used to:
  69.  
  70. # unit
  71. # indent 4-2
  72. # index "Streamed text" "Example"
  73. * Align, justify, center text
  74. # indent 4
  75. Simple sample:  You have long, streamed text.  You want it wrapped nicely:
  76.   PAGINATE infile /WRAP /LENGTH=70 /-PAGE
  77. # indent 4-2
  78. * Add headers and footers to pages
  79. # paragraph
  80. * Add page breaks
  81. # paragraph
  82. * Control indentation
  83. # paragraph
  84. * Control spacing
  85. # paragraph
  86. # index "Sorting" "Example"
  87. * Sort the file (alphabetically, not numerically all that well) in either
  88. ascending or descending order.
  89. # indent 4
  90. Simple sample:  You have an ASCII text file called BRUCE.DOC that you
  91. want to sort:
  92.   PAGINATE bruce.doc /SORT 1-50 /-PAGE
  93. # indent 4-2
  94. * Generate indexes
  95. # paragraph
  96. * Select fields to print
  97. # paragraph
  98. # index "dBase files" "Example"
  99. * Print out dBase and ASCII-delimited files in tabular forms
  100. # indent 4
  101. Simple sample:  You have a dBase file that you want printed out.
  102. Create an ASCII text file (call it, say, DBASEPAG.CTL) with the following:
  103.  
  104.   # from dbf
  105.   # include sample.dbf
  106.  
  107. Now, run the PAGINATE command:
  108.   PAGINATE dbasepag.ctl /-PAGE
  109.  
  110. # indent 4-2
  111. * Bring ASCII-delimited and dBase files into existing text
  112. # paragraph
  113. * Translate characters
  114. # paragraph
  115. # index "Multicolumn text" "Example"
  116. * Do multi-column listings
  117. # indent 4
  118. Simple sample:  You have source code.  You want it shown double-column.
  119. Create an ASCII text file (call it, say, TWOCOL.CTL) with the following:
  120.  
  121.   # width=133
  122.   # page=50
  123.   # title center
  124.   ^N%12%                                                       ^B%2%                                              Revised: ^A
  125.  
  126.   # end
  127.   # wrap
  128.   # wrapbol = "..>."
  129.   # wrapeol = " <"
  130.   # multicolumn=2
  131.   # separator = " ! "
  132.  
  133. #
  134. # indent 4
  135. Now, run the PAGINATE command:
  136.   PAGINATE infile /Ctwocol.ctl
  137. # indent 4-2
  138. * Pressing escape stops the program early.
  139. # end
  140.  
  141. Despite some of the samples shown above, the power of PAGINATE is really in
  142. combining these features for a single document.  You can bring dBase files into
  143. reports, you can reflow external documents and bring them into your report, you
  144. can generate indexes for documentation, etc.  The documentation you're reading,
  145. for example, was created using a text editor and the PAGINATE command.
  146.  
  147. # index "National Institutes of Health"
  148. The PAGINATE.EXE program is based on a document-formatting language that exists
  149. on the mainframe computers at the National Institutes of Health in Bethesda, MD.
  150. The text editor used there is called WYLBUR and it does all sorts of wonderful
  151. things like creating programs.
  152.  
  153. For documentation, you use the WYLBUR text editor and insert document formatting
  154. codes.  These codes determine things like margins, indentation, justification,
  155. spacing, etc.  After you embed all of these formatting commands, you issue a
  156. PAGINATE command and everything's reformatted for you.
  157.  
  158. PAGINATE includes many of the WYLBUR pagination commands and then adds a number
  159. or database operations.
  160.  
  161. Typically, I do most of my text formatting using the PE2 text editor which
  162. I dearly love.  I add PAGINATE marker commands to the regular documentation
  163. so I can do titles, footers, indexes, etc.
  164.  
  165. # % Nope.  Can't generate a table of contents yet using PAGINATE.
  166. # % Maybe someday!
  167. # unit verbatim
  168. # indent 8
  169. Quick remaining contents:
  170.   Introduction to marker commands...................... pg  3
  171.   Sample files......................................... pg  5
  172.   Command reference:
  173.     Formatting commands................................ pg  5
  174.     Database-related functions......................... pg 14
  175.   Control codes........................................ pg 21
  176.   Varspecs............................................. pg 22
  177.   Field-definition file................................ pg 23
  178.   Specifying parameters................................ pg 25
  179.   Character-translation file........................... pg 25
  180.   Date displays........................................ pg 27
  181.   Examples............................................. pg 28
  182.   Syntax............................................... pg 29
  183.   Return codes......................................... pg 31
  184.   Author............................................... pg 31
  185.   Index................................................ pg 32
  186. # end
  187. #
  188. # index "Marker commands"
  189. Introduction to marker commands:
  190.  
  191. PAGINATE typically expects document formatting codes to be embedded in the text
  192. document itself.  If you want the same formating to be used through the entire
  193. document, however, you can pass in most of the arguments (see the "Syntax"
  194. discussion below) or use a separate control file instead.
  195.  
  196. The formatting codes are preceded by a "marker" character.  This is a character
  197. which begins in column 1 of the text (or control) file and is typically the
  198. character "#".  (When passing in the formatting codes, all codes are preceded by
  199. a "/".)
  200.  
  201. For example, you might have text like this:
  202.  
  203. # unit
  204. # verbatim
  205.         #align width 20
  206.         This is some sample text which you have asked to align.  The margins
  207.         will be placed at 1 and 20.  You can use an indent command to shift
  208.         the left margin if desired.
  209. # end
  210.  
  211.  
  212. This example shows one marker statement ("#align width 20") which contains two
  213. formatting commands:  "align" and "width 20".  Formatting commands are keyword
  214. specific.
  215.  
  216. You can put in commands on the same line which have no logical bearing to one
  217. another like "#align spacing=2".  Exceptions:
  218.  
  219.    * Do not do this for INCLUDE statements
  220.    * Do not do this for INDEX statement
  221.  
  222. # index "Semi-colons"
  223. Formatting commands can be separated by semi-colons for clarity but only a space
  224. is required.  The case of the marker statement is irrelevant.
  225.  
  226. After the PAGINATE command is run, the above text will come out like this:
  227.  
  228. # unit
  229. # verbatim
  230.         This is some sample
  231.         text which you have
  232.         asked to align.  The
  233.         margins will be
  234.         placed at 1 and 20.
  235.         You can use an
  236.         indent command to
  237.         shift the left
  238.         margin if desired.
  239. # end
  240.  
  241. #
  242. # index "Paragraphs"
  243. In terms of alignment, justification, variable indentation, etc, the system
  244. treats each paragraph as a separate entity.  A paragraph is defined as beginning
  245. with a blank line or a space.  For example:
  246.  
  247. # unit
  248. # verbatim
  249.         #justify width 25
  250.         This is one paragraph
  251.  
  252.         And this is another paragraph.
  253.         But this is the same paragraph.
  254.           New paragraph here.
  255. # end
  256.  
  257. Comes out as this:
  258.  
  259. # unit
  260. # verbatim
  261.         This is one paragraph
  262.  
  263.         And   this   is   another
  264.         paragraph.  But  this  is
  265.         the same paragraph.
  266.           New paragraph here.
  267. # end
  268.  
  269. # index "Range of formatting"
  270. Formatting commands cover a variety of functions.  Note that formatting within
  271. titles, footers, headers, and UNIT...END blocks does not affect formatting
  272. beyond the END statement.  For example, the width of the title below does not
  273. affect the width outside the title:
  274.  
  275. # unit
  276. # verbatim
  277.         # align width 50
  278.         This text is aligned width 50.  Here comes a title.
  279.         # title center width 70
  280.         This title is centered within width 70.
  281.  
  282.         # end
  283.         This text (outside the TITLE ... END block) is still being
  284.         aligned (not centered) to width 50 (not 70).
  285. # end
  286.  
  287. # index "Short lines"
  288. # index "Paragraphs" "One liners"
  289. Note that JUSTIFY and ALIGN do not affect lines which are on their own and do
  290. not continue to a second line and do not exceed the given page length.
  291.  
  292. As an example, note that the file names shown in the next section ("Sample
  293. files:") are not affected even though they are actually controlled by a JUSTIFY
  294. marker command.  This may seem like an error at times especially if you've
  295. already indented text; remember that indentation is the system's clue that there
  296. is a new paragraph so pre-indented text won't be affected much by the program.
  297.  
  298. This feature is, by the way, frequently useful in defining oddly formatted
  299. sections of text without needing to use a "# UNIT VERBATIM" statement around it;
  300. just make sure each line begins with at least one space and the program won't
  301. touch it.
  302.  
  303. #
  304. # index "Sample files"
  305. Sample files:
  306.  
  307. An example input file and its related components are included in this ZIP
  308. under PAGDEMO.*.  You can modify this and see how features are affected.  The
  309. demonstration files are as follows:
  310.  
  311. # % As is documented above, the following lines don't need a VERBATIM
  312. # % marker because they are short enough to not be affected by the JUSTIFY
  313. # % marker command.
  314.         PAGDEMO.BAT      Batch file that actually runs the demo file
  315.         PAGDEMO.#1       The primary file for the demo
  316.         PAGDEMO.#1D      The ASCII-delimited file brought in for the demo
  317.         PAGDEMO.#1C      The field-definition file used for the demo
  318.  
  319.  
  320. # rule=-
  321.                                COMMAND REFERENCE
  322. # rule=-
  323. # index "Formatting commands"
  324.                               Formatting commands
  325.  
  326.  
  327. # index "Equal signs"
  328. The following section describes the formatting commands alphabetically with some
  329. cross-referencing.  The commands are case insensitive ("align" and "ALIGN" are
  330. the same).  Typically, the equal signs are optional ("WIDTH=80" is the same as
  331. "WIDTH 80") except when used from the DOS command line.  Remember, the text
  332. line that these commands appear in must begin with the designated marker
  333. character (typically a "#").
  334.  
  335. # index "Formatting commands" "Default values"
  336. Default initial values (format commands):
  337.         FLAG=NULL
  338.         INDENT=0
  339.         INDENTER=" "
  340.         INDENTFLAG=NULL
  341.         WIDTH=80
  342.         MARGIN=1
  343.         MARKER=#
  344.         PAGE=60
  345.         PAGEEJECT=\012\013\010
  346.         SINGLE
  347.         VERBATIM
  348.         WRAPBOL=NULL
  349.         WRAPEOL=NULL
  350.  
  351. # indent 3-3
  352. # index "Formatting commands" "% (comments)"
  353. # index "% (comments)"
  354. %: Comments.  You can add comments after any marker command or you can embed
  355. them as marker commands all on their own.
  356.  
  357. # index "Formatting commands" "ADJUST"
  358. # index "ADJUST"
  359. ADJUST:  Tells the system to not write single lines on the bottom of a page.
  360. This is typically done to control "widow lines", cases where the first line of
  361. a paragraph prints on the bottom of one page and the remainder of the paragraph
  362. prints on the top of the next.
  363.  
  364. # index "Formatting commands" "-ADJUST"
  365. # index "-ADJUST"
  366. -ADJUST:  Says that "widow lines" are okay.
  367.  
  368. # index "Formatting commands" "ALIGN"
  369. # index "ALIGN"
  370. ALIGN:  Aligns text (uneven right margins) according to the default page width.
  371. See also: CENTER, JUSTIFY, RIGHT, VERBATIM, and WRAP.  See also WIDTH.
  372.  
  373. # index "Formatting commands" "-ALIGN"
  374. # index "-ALIGN"
  375. -ALIGN:  Same thing as VERBATIM.
  376.  
  377. #
  378. # index "Formatting commands" "CENTER"
  379. # index "CENTER"
  380. CENTER:  Centers text according to the default page width.  Unlike ALIGN,
  381. JUSTIFY, and RIGHT, the CENTER command does not actually reflow any text.  If
  382. your line is wider than the specified width, it will not be split into multiple
  383. lines for you.  Note when CENTER is in effect, leading spaces are automatically
  384. removed from text lines so centering can be recalculated correctly.  See also:
  385. ALIGN, JUSTIFY, RIGHT, VERBATIM, and WRAP.  See also WIDTH.
  386.  
  387. # index "Formatting commands" "-CENTER"
  388. # index "-CENTER"
  389. -CENTER:  Same thing as VERBATIM.
  390.  
  391. # index "Formatting commands" "DATE"
  392. # index "DATE"
  393. DATE=string:  Sets the date format used to fill in ^D and ^A references in the
  394. title, footer, or header sections.  If no DATE specification is provided, your
  395. default country setting will be used.  Note that the DATE marker must be used
  396. *before* the title, footer, or header section in order to be applied to it.
  397. The date should be enclosed in quotes.  See also:  "control codes" and
  398. "date displays" discussion below.  See also:  FOOTER, HEADER, and TITLE.
  399. Example:
  400.  
  401. # unit verbatim
  402.         # date="mmm dd, yyyy"
  403. # end
  404.  
  405. # index "Formatting commands" "DOUBLE"
  406. # index "DOUBLE"
  407. DOUBLE:  Double-spaces all text.  See also: SINGLE, SPACING=n, and TRIPLE.
  408.  
  409. # index "Formatting commands" "EJECT"
  410. # index "EJECT"
  411. # index "Page-eject characters"
  412. EJECT:  Causes a new page to be created.  A regular decimal 12 character (the
  413. female symbol) is also treated as a page eject in the input file as long as it
  414. appears by itself on a line.  See also:  PAGEEJECT, PAGEEJECT=string, and
  415. PAGEFILL.
  416.  
  417. # index "BACK parameter" "EJECT BACK command"
  418. # index "Formatting commands" "EJECT BACK"
  419. # index "EJECT BACK"
  420. EJECT BACK:  Same as EJECT but makes sure you are ejected to the next even
  421. numbered page.  See EJECT FRONT discussion.
  422.  
  423. # index "FRONT parameter" "EJECT FRONT command"
  424. # index "Formatting commands" "EJECT FRONT"
  425. # index "EJECT FRONT"
  426. EJECT FRONT:  Same as EJECT but makes sure you are ejected to the next odd
  427. numbered page.  This is mostly used in the case of a document that contains
  428. chapters.  You typically want a chapter to start on an odd-numbered page.
  429. If the previous chapter ended on page 7, you wouldn't want to just eject the
  430. page because that would start on page 8.  On the other hand, EJECT FRONT
  431. insures that the next page will be page 9.  (EJECT FRONT is the same as EJECT
  432. if you're currently on a even numbered page.)
  433.  
  434. # index "Formatting commands" "FLAG"
  435. # index "FLAG"
  436. FLAG=string:  Allows you to set a character or set of characters that appears
  437. at the end of the lines that follow.  The location of the flag characters is
  438. the width of the line plus a space plus whatever string you specify.  For
  439. example, #flag="!" when #width=20 is in effect will result in "!" appearing
  440. at column 22 on each of the effected lines.  Initially defaults to FLAG=NULL.
  441. See also: INDENTFLAG=string.
  442.  
  443. # index "END" "FOOTER command"
  444. # index "Formatting commands" "FOOTER"
  445. # index "FOOTER"
  446. FOOTER ... END:  Defines a footer to appear at the bottom of each page.  Has
  447. same features that TITLE ... END has; see that discussion.
  448.  
  449. # index "Formatting commands" "-FOOTER"
  450. # index "-FOOTER"
  451. # index "FOOTER" "Deactivating"
  452. -FOOTER:  Turns off the current footer specification.  See FOOTER ... END.
  453.  
  454. # indent 3-3
  455. # index "Formatting commands" "INCLUDE filename"
  456. # index "INCLUDE filename"
  457. # index "Adding files"
  458. INCLUDE filename:  Adds another file to the processing.  This file is processed
  459. according to whatever formatting defaults are in use at that point.
  460.  
  461. # index "Formatting commands" "INDENT=n"
  462. # index "INDENT=n"
  463. INDENT=n:  Indents the text which follows by "n" spaces.  Essentially sets the
  464. left margin.  Default value: INDENT=0.  See also: INDENTFLAG=string.
  465.  
  466. #
  467. # index "Formatting commands" "INDENT=n-n"
  468. # index "INDENT n-n"
  469. # index "Bulleted text"
  470. INDENT=n-n:  Specifies that most of the lines of a paragraph are to be
  471. indented by "n" spaces whereas the first word of the first line is to be
  472. indented by "n-n" spaces.  For example, "INDENT 5-3" will indent the first word
  473. by two spaces and the subsequent lines by 5 spaces.  This is frequently used for
  474. bulleted text.  See also: INDENTFLAG=string and INDENTER=string.
  475.  
  476. # indent 3
  477. # index "Bulleted text" "Tricks"
  478. Note with bulleted items that if you want single-spaced items bulleted, include
  479. a #paragraph statement before the next bullet.  This is only a problem because
  480. the routine doesn't start re-indenting text until it thinks it's at another
  481. paragraph.  (A blank line would have worked fine but you want it single spaced
  482. some times.) For example:
  483.  
  484. # unit verbatim
  485.         # indent 5-2
  486.         * This is one paragraph to be indented
  487.         # paragraph
  488.         * And this is another.
  489. # end
  490.  
  491. Remember that the indentation rule applies to the first word of the first line
  492. of a given paragraph.  That word can be a bullet (like an asterisk) but it can
  493. also be an actual word.  This is useful when the first words of different
  494. paragraphs are of different widths.  For example:
  495.  
  496. # unit verbatim
  497.         # indent 8-8
  498.         Home Takes you to the top line
  499.         # indent 8-8
  500.         End Takes you to the bottom line
  501.         # indent 8-8
  502.         F1 Presents help
  503. # end
  504.  
  505. This ends up like this:
  506.  
  507. # unit verbatim
  508.         Home    Takes you to the top line
  509.         End     Takes you to the bottom line
  510.         F1      Presents help
  511. # end
  512.  
  513. # index "INDENTER string" "Example"
  514. If you want, you can fake the system into thinking that multiple words are, in
  515. fact single words for indentation or word-wrapping purchases.  This can be done
  516. in two ways.  The first is to use the INDENTER=string marker command.  This
  517. allows you to say something like this:
  518.  
  519. # unit verbatim
  520.         # indenter=":"
  521.         # align length 30
  522.         # indent 14-14
  523.         First item: This is the first element.
  524.         # paragraph
  525.         Second item: And this the second.
  526.         # paragraph
  527.         Third item: And finally, this the last.
  528.         # indenter=" "
  529. # end
  530.  
  531. #
  532. This ends up like this:
  533.  
  534. # unit verbatim
  535.         First item:   This is the
  536.                       first element.
  537.         Second item:  And this the
  538.                       second.
  539.         Third item:   And finally,
  540.                       this the last.
  541. # end
  542.  
  543. # index "Wrapping" "Faking out"
  544. # index "Alt-255 key"
  545. The second technique is done by putting a non-printable character instead of a
  546. space character between the words.  A good character to use is Alt-255 (press
  547. the Alt key, while it's down, press the digits 2, 5, 5 on the numeric keypad,
  548. then release the Alt key).  This character shows up as a space but the system
  549. treats it as a regular character so it doesn't split up the words it's between.
  550.  
  551. Warning:  It's easy to forget you used Alt-255.  If you use Alt-255 frequently,
  552. remember to check for it with a hex text viewer (like LIST) when you're
  553. wondering why text didn't wrap or otherwise behave the way you expected.
  554.  
  555. Note that using INDENT=n-n causes pre-indented paragraphs to be treated
  556. differently than any other INDENT specification would.  Consider the following:
  557.  
  558. # unit verbatim
  559.         # -indent
  560.                 This is some
  561.                 sample text
  562.         # indent 3
  563.                 This is some
  564.                 sample text
  565.         # indent 3-3
  566.                 This is some
  567.                 sample text
  568. # end
  569.  
  570. In all cases, the system considers that any line that is either empty or begins
  571. with a space in fact starts a paragraph.  In the first case, the system says
  572. don't change any indentation for either line.  In the second case, the system
  573. figures new paragraphs for each line and additionally indents each line.  In the
  574. last case, the system knows that the first word is be de-indented so it removes
  575. leading spaces.  As a result, you get the following:
  576.  
  577. # unit verbatim
  578.                 This is some
  579.                 sample text
  580.                    This is some
  581.                    sample text
  582.         This is some
  583.         sample text
  584. # end
  585.  
  586. The use of #UNIT and #VERBATIM blocks is one way to insure consistency
  587. within indented sections even for single-line blocks of text.
  588.  
  589. #
  590. # indent 3-3
  591. # index "Formatting commands" "INDENT=n+n"
  592. # index "INDENT=n+n"
  593. INDENT=n+n:  Specifies that most of the lines of a paragraph are to be
  594. indented by "n" spaces whereas the first line is to be indented by "n+n" spaces.
  595. For example, "INDENT 5+3" will indent the first line by eight spaces and the
  596. subsequent lines by 5 spaces.  See also: INDENTFLAG=string.
  597.  
  598. # index "Formatting commands" "-INDENT"
  599. # index "-INDENT"
  600. -INDENT:  Same thing as INDENT=0.
  601.  
  602. # index "Formatting commands" "INDENTER"
  603. # index "INDENTER=string"
  604. INDENTER=string:  Specifies that the designated string is to be used when
  605. determining breaks in INDENT n-n cases.  A typical example of this would be
  606. to use INDENTER=":" (see the example in the INDENT=n-n example above).  The
  607. specified string can be one or more characters in length (it cannot be null).
  608. If the specified string is not found in the line to be wrapped, a space
  609. character will be looked for instead.  Defaults to INDENTER=" ".
  610.  
  611. # index "Formatting commands" "INDENTFLAG"
  612. # index "INDENTFLAG=string"
  613. # index "Elsie"
  614. INDENTFLAG=string:  Specifies characters that are to be added to start of each
  615. indented line.  Is sometimes used for highlighting text.  Defaults to
  616. INDENTFLAG=NULL.  See also: FLAG=string and INDENT=n.  For example,
  617.  
  618. # unit verbatim
  619.         # indent 4
  620.         # align width 30
  621.         # indentflag="> "
  622.         My cat's name is Elsie.  It actually is "LC" and stands for
  623.         "Lost Cat" but it's "Elsie" for short.  Elsie's actually
  624.         male.  I thought it rude to check.
  625. # end
  626.  
  627. # indent 3
  628. Ends up as:
  629.  
  630. # unit verbatim
  631.         >   My cat's name is Elsie.
  632.         >   It actually is "LC" and
  633.         >   stands for "Lost Cat" but
  634.         >   it's "Elsie" for short.
  635.         >   Elsie's actually male.  I
  636.         >   thought it rude to check.
  637. # end
  638.  
  639. # indent 3-3
  640. # index "Formatting commands" "JUSTIFY"
  641. # index "JUSTIFY"
  642. JUSTIFY:  Justifies text (makes right margins flush) within the default page
  643. width.  See also:  ALIGN, CENTER, RIGHT, VERBATIM, and WRAP.  See also WIDTH.
  644.  
  645. # index "Formatting commands" "-JUSTIFY"
  646. # index "-JUSTIFY"
  647. -JUSTIFY:  Same thing as VERBATIM.
  648.  
  649. # index "Formatting commands" "MARKER=c"
  650. # index "MARKER=c"
  651. # index "Changing marker character"
  652. MARKER=c:  Defines the single-character marker indicator that will appear in
  653. column 1 of all subsequent lines.  Default value: MARKER=#.
  654.  
  655. # index "Formatting commands" "MARGIN=n"
  656. # index "Formatting commands" "LMARGIN=n"
  657. # index "MARGIN=n"
  658. # index "LMARGIN=n"
  659. MARGIN=n:  (Or LMARGIN=n)  Specifies that the left margin is to be set at
  660. a particular column.  This allows you to keep standard indentation and such
  661. while shifting the entire page for punch holes or whatever.  The margin is
  662. set independently of the other settings; if you have INDENT=5 and MARGIN=10,
  663. the actual text will start appearing at column 15 on the page.  Default value:
  664. MARGIN=1.
  665.  
  666. # index "Formatting commands" "NEXT=n"
  667. # index "NEXT=n"
  668. NEXT=n:  Specifies which page number will appear the next time ^B appears in
  669. a title, footer, or header.  You can specify "-NEXT" or "NEXT=0" to start
  670. at 0.  Starts at NEXT=1 typically.
  671.  
  672. #
  673. # index "Formatting commands" "-PAGE"
  674. # index "-PAGE"
  675. -PAGE:  Same as "PAGE=0".
  676.  
  677. # index "Formatting commands" "PAGE=n"
  678. # index "PAGE=n"
  679. PAGE=n:  Defines default page length.  You can say "PAGE=0" to set continuous
  680. pages.  (You have to have a page length specified if you're using the
  681. MULTICOLUMN option though.) Default value:  PAGE=60.
  682.  
  683. # index "Formatting commands" "PAGEEJECT"
  684. # index "PAGEEJECT"
  685. PAGEEJECT:  Says that pages are to be terminated with the standard page eject
  686. sequence (the female symbol--decimal 12--followed by a carriage return and line
  687. feed) instead of padding the pages with blank lines.  This is the default value
  688. and is the same thing as saying "PAGEEJECT=\012\013\010".  See also:
  689. PAGEEJECT=string and PAGEFILL.
  690.  
  691. # index "Formatting commands" "PAGEEJECT=string"
  692. # index "PAGEEJECT=string"
  693. PAGEEJECT=string:  Says that pages are to be terminated with a user-defined
  694. character sequence instead of padding the pages with blank lines.  The main
  695. reason for using this instead of just PAGEEJECT is if you want to remove the
  696. CR/LF that typically follows each page eject.  Another reason is to use
  697. "PAGEEJECT=1\013\010" for files being generated for IBM mainframes that use
  698. carriage control characters.  See also:  PAGEEJECT and PAGEFILL.
  699.  
  700. # index "Formatting commands" "PAGEFILL"
  701. # index "PAGEFILL"
  702. PAGEFILL:  Says that pages are to be ended by padding them with blank lines up
  703. to the specified PAGE=n value.  You are essentially using PAGEFILL if you
  704. specify a footer; pages have to be filled up with blank lines to read the
  705. footer line.  See also: PAGEEJECT and PAGEEJECT=string.
  706.  
  707. # index "Formatting commands" "PARAGRAPH"
  708. # index "PARAGRAPH"
  709. PARAGRAPH:  Says that a new paragraph is about to begin.  This is primarily used
  710. when you have something like bulleted text which might not be properly aligned.
  711. For example:
  712.  
  713. # unit verbatim
  714.         # align width 40 indent 5-2
  715.         * First bulleted item
  716.         # paragraph
  717.         * Second bulleted item.  Note that this would have been considered
  718.         to be part of the first paragraph since it started in column 1 and
  719.         there was no blank line between them.
  720. # end
  721.  
  722. # index "Formatting commands" "RIGHT"
  723. # index "RIGHT"
  724. RIGHT:  Moves all text to be flush to the right margin.  Doesn't adjust any
  725. spacing between words or anything.  See also:  ALIGN, CENTER, JUSTIFY, VERBATIM,
  726. and WRAP.  See also WIDTH.
  727.  
  728. # index "Formatting commands" "-RIGHT"
  729. # index "-RIGHT"
  730. -RIGHT:  Same thing as VERBATIM.
  731.  
  732. # index "Formatting commands" "RULE"
  733. # index "RULE string"
  734. RULE=string:  Specifies that a string is to be repeated the width of the line.
  735. This is used to separate sections.  The string can be a single character (like
  736. "RULE=-"), multiple characters (like "RULE="- ""), it can contain decimal and
  737. hexadecimal characters (like "RULE=\066\097\116"), it can be "RULE=NULL" (which
  738. typically results in a blank line), or just simply "RULE" (which is the same
  739. thing as "RULE=-").  Personally, if your printer supports IBM graphics
  740. characters, I find RULE=\196 to be the most pleasing of the rule lines.  (See
  741. BRUCEHEX.DOC file.)
  742.  
  743. #
  744. # index "Formatting commands" "SINGLE"
  745. # index "SINGLE"
  746. SINGLE:  Single-spaces all text.  This is the default spacing.  See also:
  747. DOUBLE, SPACING=n, and TRIPLE.
  748.  
  749. # index "Formatting commands" "SPACING=n"
  750. # index "SPACING=n"
  751. SPACING=n:  Sets spacing between lines as "n" number of lines.  See also:
  752. DOUBLE (which is SPACING=2), SINGLE (SPACING=1), and TRIPLE (SPACING=3).
  753.  
  754. # index "END" "TITLE command"
  755. # index "Formatting commands" "TITLE"
  756. # index "TITLE"
  757. TITLE ...  END:  Defines a title to appear at the top of each page.  Any number
  758. of lines can appear in the title.  The title ends with a marker line that
  759. contains the "end" command; if no "end" command is provided, the program
  760. presumes there is one after the last line of your file.  Spacing, indentation,
  761. width, and alignment cannot vary within the title; the last one assigned will
  762. win.  See "control codes" discussion below for characters that can appear in the
  763. title.  To eliminate the title, define a title without any lines in it.  See
  764. also:  FOOTER ...  END, HEADER ...  END and UNIT ...  END.  Example:
  765.  
  766. # unit verbatim
  767.         # title center width=80
  768.         This is my program!
  769.  
  770.         # end
  771. # end
  772.  
  773. # indent 3
  774. If you plan to change the title within the document, make sure you redefine
  775. it before the new page is generated.  For example:
  776.  
  777. # unit verbatim
  778.         (text)
  779.         # title center width=80
  780.         Index
  781.  
  782.         # end
  783.         #
  784. # end
  785.  
  786. If you define it after the page eject, the new title will not take effect until
  787. a subsequent page (if any) is generated.  By the same token, make sure the title
  788. is defined in the document before any text is filled in if you want the title to
  789. appear on the very first page of the reformatted document.
  790.  
  791. A very useful title is the following:
  792.  
  793. # unit verbatim
  794.         # title center width=80
  795.         ^O%12%                         ^B%3%                       Revised: ^A
  796.  
  797.         # end
  798. # end
  799.  
  800. Consult the "control code" discussion afterward but this will fill in the
  801. output file's name (taking up 12 spaces so all of your titles look about the
  802. same), the page number (taking up 3 spaces for the page number), and the input
  803. file's date.
  804.  
  805. #
  806. # indent 3-3
  807. # index "Formatting commands" "-TITLE"
  808. # index "-TITLE"
  809. # index "TITLE" "Deactivating"
  810. -TITLE:  Turns off the current title specification.  See TITLE ... END.
  811.  
  812. # index "Formatting commands" "TRIPLE"
  813. # index "TRIPLE"
  814. TRIPLE:  Triple-spaces all text.  See also: DOUBLE, SINGLE, and SPACING=n.
  815.  
  816. # index "END" "UNIT command"
  817. # index "Formatting commands" "UNIT"
  818. # index "UNIT"
  819. UNIT ... END:  Defines a unit of text with its own unique formatting.  Units
  820. can have formatting which differs from the text around it and changing the
  821. formatting within the Unit will not affect the other text.  Has same features
  822. that TITLE ... END has; see that discussion.
  823.  
  824. # indent 3
  825. A typical use for the UNIT command is in combination with VERBATIM.  This is
  826. frequently used when you're aligning or justifying most of the text and then you
  827. have one section that isn't to be changed at all.
  828.  
  829. # indent 3-3
  830. # index "Formatting commands" "VERBATIM"
  831. # index "VERBATIM"
  832. VERBATIM:  Specifies that the text which follows should not be aligned,
  833. justified, etc.  See also: ALIGN, CENTER, JUSTIFY, RIGHT, and WRAP.  See also
  834. WIDTH.
  835.  
  836. # index "Formatting commands" "WIDTH=n"
  837. # index "WIDTH=n"
  838. WIDTH=n:  Specifies the default line width.  (Page lengths are controlled by the
  839. PAGE=command.) Default value:  WIDTH=80.  (Note that LENGTH=n is accepted as a
  840. synonym for WIDTH=n.) See also:  ALIGN, CENTER, JUSTIFY, RIGHT, VERBATIM, and
  841. WRAP.
  842.  
  843. # index "Formatting commands" "WRAP"
  844. # index "WRAP"
  845. # index "Streamed text" "WRAP command"
  846. WRAP:  Specifies that long lines (longer than the specified line width) in the
  847. text which follows should be wrapped.  Lines which are shorter than the
  848. specified line width are not affected at all.  Primarily of use in files
  849. produced by a word-processor since they typically write the entire paragraph as
  850. a stream.  Also useful for printing source code.  See also:  ALIGN, CENTER,
  851. JUSTIFY, RIGHT, and VERBATIM.  See also WIDTH, WRAPBOL=string, and
  852. WRAPEOL=string.
  853.  
  854. # index "Formatting commands" "-WRAP"
  855. # index "-WRAP"
  856. -WRAP:  Same thing as VERBATIM.
  857.  
  858. #
  859. # index "Formatting commands" "WRAPBOL"
  860. # index "WRAPBOL=string"
  861. WRAPBOL=string:  Is used with the WRAP command to indicate that continued lines
  862. are to begin with the specific string.  This is useful for source code listings.
  863. Initially defaults to WRAPBOL=NULL.  An example of its use:
  864.  
  865. # unit verbatim
  866.         # length=50
  867.         # wrap
  868.         # wrapbol=" > "
  869.         # wrapeol=" <"
  870.         IF Word2$ = "" THEN
  871.           CALL WriteError("Missing required " + Item$ + " parameter", "", SourceText$)
  872.         ELSEIF VAL(Word2$) < MinVal% OR VAL(Word2$) > MaxVal% THEN
  873.           CALL WriteError("Invalid " + Item$ + " parameter", "", SourceText$)
  874.         ELSE
  875.           CkParmN% = VAL(Word2$)
  876.         END IF
  877. # end
  878.  
  879. will result in the following output:
  880.  
  881. # unit verbatim
  882.         IF Word2$ = "" THEN
  883.           CALL WriteError("Missing required " + Item$ + <
  884.          > " parameter", "", SourceText$)
  885.         ELSEIF VAL(Word2$) < MinVal% OR VAL(Word2$) > <
  886.          > MaxVal% THEN
  887.           CALL WriteError("Invalid " + Item$ + " <
  888.          > parameter", "", SourceText$)
  889.         ELSE
  890.           CkParmN% = VAL(Word2$)
  891.         END IF
  892. # end
  893.  
  894. # index "Formatting commands" "WRAPEOL"
  895. # index "WRAPEOL=string"
  896. WRAPEOL=string:  Is used with the WRAP command to indicate that if the line
  897. can't fit on the current line, the end of the line is to be tagged with the
  898. specified string.  This is useful for source code listings.  Initially
  899. defaults to WRAPEOL=NULL.  See the example under the WRAPBOL=string command.
  900.  
  901. #
  902. # index "Database-related commands"
  903. # indent 0
  904. # rule=-
  905.                            Database-related functions
  906.  
  907. The PAGINATE command provides some features to allow you to use it to read in
  908. and print out ASCII-delimited and dBase files.  For example:
  909.  
  910.         # from ascii
  911.         "Apples",10,5
  912.         "Bananas",20,10
  913.  
  914. will come out as:
  915.  
  916.         Apples   10  5
  917.         Bananas  20 10
  918.  
  919. You can use this capability to embed tables within a report.  You can also
  920. combine this with SORT=varspec, SELECT=varspec, and SUM=varspec specifications
  921. to have the report sorted on specified columns or to subset the columns that get
  922. printed out.  There are some restrictions to all of this and these are described
  923. within each option as appropriate below.
  924.  
  925. NOTE:  In general, combining FROM ASCII or FROM DBF or several of the other
  926. data-base related functions with options like ALIGN and JUSTIFY will not work.
  927. The formatting options will, in general, be ignored.
  928.  
  929. # index "Sorting" "Example"
  930. It's often the case that you will want to deal only with a single data set,
  931. and you'll have no need for actual text.  For example, let's say that you really
  932. want something that will sort a file that contains a lot of data.  No problem:
  933.  
  934.         PAGINATE infile outfile /-PAGE /SORT=1,10
  935.  
  936. # index "dBase files" "Example"
  937. Another example would be that you have something like a dBase file and you want
  938. to print it out.  Again, no problem.  Create a simple control file:
  939.  
  940. # unit
  941. # verbatim
  942.         # heading
  943.         ^H
  944.  
  945.         # end
  946.         # from dbf
  947.         # include sample.dbf
  948. # end
  949.  
  950. and then create your tables with:
  951.  
  952.         PAGINATE ctlfile outfile
  953.  
  954. In general, keep in mind that sorting, totaling, and other special data base
  955. function requests should appear before the data are actually read in.  This
  956. means #SORT or #SUM should appear before the #INCLUDE statement.
  957.  
  958.  
  959. #
  960. # index "Database-related commands" "Default values"
  961. Default initial values (database-related functions):
  962.  
  963.         BAD=ABORT
  964.         -BREAK
  965.         -DELETED
  966.         DELIMS=",,,
  967.         FROM FIXED
  968.         GAP=2
  969.         INMISS=NULL
  970.         INMISSC=NULL
  971.         OUTMISS=NULL
  972.         OUTMISSC=NULL
  973.         SELECT=NULL
  974.         SEPARATOR=" | "
  975.         SORT=NULL
  976.         SUM=NULL
  977.  
  978. # indent 3-3
  979. # index "ABORT parameter" "BAD=ABORT command"
  980. # index "Database-related commands" "BAD=ABORT"
  981. # index "BAD=ABORT"
  982. BAD=ABORT:  Says that if the program runs into an invalid data value,
  983. it should abort processing entirely.
  984.  
  985. # index "MISSING parameter" "BAD=MISSING command"
  986. # index "Database-related commands" "BAD=MISSING"
  987. # index "BAD=MISSING"
  988. BAD=MISSING:  Says that if the program runs into an invalid data value, it
  989. should set the value of that variable as "missing" and continue processing.
  990.  
  991. # index "SKIP parameter" "BAD=SKIP command"
  992. # index "Database-related commands" "BAD=SKIP"
  993. # index "BAD=SKIP"
  994. BAD=SKIP:  Says that if the program runs into an invalid data value, it should
  995. skip the entire data record and continue processing with the next record.
  996.  
  997. # index "Database-related commands" "BREAK"
  998. # index "BREAK"
  999. BREAK=varspec:  BREAK provides a way of generating subtotals or subgroupings
  1000. within a listing.  Whenever the value of the variable specified changes, the
  1001. program will generate either a blank line or a subtotal (if SUM=varspec has been
  1002. specified).  If subtotals are generated, at the end it will generate a grand
  1003. total.
  1004.  
  1005. # index "NULL parameter" "BREAK=NULL command"
  1006. # index "Database-related commands" "BREAK NULL"
  1007. # index "BREAK NULL"
  1008. BREAK=NULL:  Turns off all subtotalling.  This is initially the default.
  1009.  
  1010. # index "Database-related commands" "-BREAK"
  1011. # index "-BREAK"
  1012. -BREAK:  Same as BREAK=NULL.
  1013.  
  1014. # index "Database-related commands" "DELETED"
  1015. # index "DELETED"
  1016. DELETED:  Says to process deleted records as well as non-deleted records from
  1017. dBase files.
  1018.  
  1019. # index "Database-related commands" "-DELETED"
  1020. # index "-DELETED"
  1021. -DELETED:  Says to skip deleted records.
  1022.  
  1023. # index "Database-related commands" "DELIMS"
  1024. # index "DELIMS"
  1025. # index "Hexadecimal codes"
  1026. DELIMS=aroundstrings,aroundnums,betweenfields:  Allows you to specify the
  1027. delimiters (in sequence) around string fields, around numeric fields, and
  1028. between fields.  Defaults to:
  1029.  
  1030. # unit verbatim
  1031.         DELIMS=",,,
  1032. # end
  1033.  
  1034. # indent 3
  1035. (Use quotes around character strings, nothing around numeric data, and the third
  1036. comma indicates that there is a comma between fields.) The replacement string
  1037. can include hexadecimal codes (in the &Hxx format) or decimal codes (in the \ddd
  1038. format) if necessary so either of the following would put a tab between fields:
  1039.  
  1040. # unit verbatim
  1041.         DELIMS=",,&H09
  1042.         DELIMS=",,\009
  1043. # end
  1044.  
  1045. See the BRUCEHEX.DOC file.
  1046.  
  1047. # indent 3-3
  1048. # index "ASCII parameter" "FROM ASCII command"
  1049. # index "Database-related commands" "FROM ASCII"
  1050. # index "FROM ASCII"
  1051. # index "ASCII-delimited files"
  1052. # index "Files" "ASCII-delimited"
  1053. FROM ASCII:  Specifies that the next non-marker lines contain ASCII-delimited
  1054. records.  The ASCII-delimited records can be embedded within the report or
  1055. stored as a separate file (brought in with an INCLUDE statement).  See also:
  1056. FROM DBF and FROM FIXED and most of the other commands in this section.  See
  1057. also:  "Field-definition file" discussion.
  1058.  
  1059. # INDEX "DBF parameter" "FROM DBF command"
  1060. # index "Database-related commands" "FROM DBF"
  1061. # index "FROM DBF"
  1062. # index "dBase files"
  1063. # index "Files" "dBase"
  1064. FROM DBF:  Specifies that the next INCLUDE statement is a dBase file.  Unlike
  1065. with FROM FIXED and FROM ASCII, the dBase file has to be external to the control
  1066. cards.  The output itself, however, will be included with the regular output
  1067. file.  See also: FROM ASCII and FROM FIXED and most of the other commands in
  1068. this section.  See also: "Field-definition file" discussion.
  1069.  
  1070. # index "FIXED parameter" "FROM FIXED command"
  1071. # index "Database-related commands" "FROM FIXED"
  1072. # index "FROM FIXED"
  1073. FROM FIXED:  Specifies that the input file is a fixed-field file.  Any document
  1074. with regular text (for example, a letter to your best buddy) is considered
  1075. fixed-field by the program; if you classify it as anything else, the program
  1076. will try to parse it all.  See also:  FROM ASCII and FROM DBF.
  1077.  
  1078. # index "Database-related commands" "-GAP"
  1079. # index "-GAP"
  1080. -GAP:  Same as "GAP=0".
  1081.  
  1082. # index "Database-related commands" "GAP=n"
  1083. # index "GAP=n"
  1084. GAP=n:  Specifies the number of spaces to appear between columns when printing
  1085. fielded data.  If, for example, two columns of numbers are printed, the GAP
  1086. parameter specifies that "n" number of spaces are to appear between these
  1087. columns.  You can specify "GAP=0" if you don't want any gap to be inserted.
  1088. Defaults to GAP=2.
  1089.  
  1090. # index "END" "HEADER command"
  1091. # index "Database-related commands" "HEADER"
  1092. # index "HEADER"
  1093. # index "Column headers"
  1094. HEADER ... END:  Defines a set of column headers that should appear before
  1095. the actual data.  Typically, you can bring these in from the actual dBase file
  1096. or else use whatever you've specified in the field-definition file by using the
  1097. "^H" control code.  Headers are affected by the MULTICOLUMN specification.
  1098. Otherwise, they are treated pretty much like Titles and Footers.  See the
  1099. discussion of TITLE ... END.
  1100.  
  1101. # index "Formatting commands" "-HEADER"
  1102. # index "-HEADER"
  1103. # index "HEADER" "Deactivating"
  1104. -HEADER:  Turns off the current header specification.  See HEADER ... END.
  1105.  
  1106. # index "filename parameter" "INCLUDE filename command"
  1107. # index "Database-related commands" "INCLUDE filename"
  1108. # index "INCLUDE filename"
  1109. # index "Files" "Adding"
  1110. INCLUDE filename:  Adds text from another file in at this point.  If the routine
  1111. has been told that this is a FROM DBF or FROM ASCII file, it will process the
  1112. file appropriately.  The filename specification can include drive and path
  1113. information if desired.
  1114.  
  1115. # index "INDEX parameter" "INCLUDE INDEX command"
  1116. # index "Database-related commands" "INCLUDE INDEX"
  1117. # index "INCLUDE INDEX"
  1118. INCLUDE INDEX:  Creates an index listing at this point in the document.  See
  1119. also: INDEX.
  1120.  
  1121. # index "filename parameter" "INDEF filename command"
  1122. # index "Database-related commands" "INDEF filename"
  1123. # index "INDEF filename"
  1124. # index "Field-definition file"
  1125. INDEF filename:  Specifies that the file characteristics for the input file
  1126. which follows are contained in a field-definition file specified as "filename".
  1127. The filename spec can include drive and path information if desired.  See the
  1128. discussion of "Field-definition files" below.  See also: INDEF NULL.
  1129.  
  1130. # index "NULL parameter" "INDEF NULL command"
  1131. # index "Database-related commands" "INDEF NULL"
  1132. # index "INDEF NULL"
  1133. INDEF NULL:  Says there is no input file definition for what follows.  Typically
  1134. used to turn off the previously-specified input field-definition file.  See
  1135. also: INDEF filename.
  1136.  
  1137. # index "Database-related commands" "-INDEF"
  1138. # index "-INDEF"
  1139. -INDEF:  Same thing as INDEF NULL.
  1140.  
  1141. #
  1142. # index "DUMMY parameter" "INDEX command"
  1143. # index "Database-related commands" "INDEX"
  1144. # index "INDEX"
  1145. # index "See Also references"
  1146. INDEX "word" [ "word" ]...  [DUMMY]:  Saves an index record, with the specified
  1147. text and the current page number, at this point.  The index is then printed out
  1148. when you add an INCLUDE INDEX option.  The multiple word specifications allow
  1149. you to specify up to 3 levels of indexing.  For example,
  1150.  
  1151. # unit verbatim
  1152.         # index "Computers" "Maintenance"
  1153.         # index "Computers" "Hardware"
  1154.         # eject
  1155.         # index "Computers" "Hardware"
  1156.         # index "Computers" "Software"
  1157.         # include index
  1158. # end
  1159.  
  1160. # indent 3
  1161. will generate output that looks in part like this:
  1162.  
  1163. # unit verbatim
  1164.         Computers
  1165.           Hardware; 1, 2
  1166.           Maintenance; 1
  1167.           Software; 2
  1168. # end
  1169.  
  1170. # index "MULTICOLUMN" "With INDEX"
  1171. # index "INDEX" "With MULTICOLUMN"
  1172. You can use MULTICOLUMN in combination with the INDEX command.  Just make sure
  1173. you specify the MULTICOLUMN before the INCLUDE INDEX statement as in:
  1174.  
  1175. # unit verbatim
  1176.         # multicolumn 3
  1177.         # include index
  1178. # end
  1179.  
  1180. # index "DUMMY index references"
  1181. If DUMMY is specified, the page number is not displayed for this item.  This is
  1182. typically done when you want the index to provide a cross-reference but you
  1183. don't really want any page numbers showing up.  For example:
  1184.  
  1185. # unit verbatim
  1186.         # index "Hardware" "(See Computers)" DUMMY
  1187. # end
  1188.  
  1189. My personal preference is to put all DUMMY index references near the start of
  1190. your document so you can find them more easily.
  1191.  
  1192. # indent 3-3
  1193. # index "Database-related commands" "INMISS=val"
  1194. # index "INMISS=val"
  1195. INMISS=val:  Specifies for ASCII-delimited and dBase input files which numeric
  1196. values are to be considered indicators for missing values.  Missing values
  1197. are not included in summations.  Defaults to INMISS=NULL.  See also:
  1198. INMISSC=val, OUTMISS=val, and OUTMISSC=val.
  1199.  
  1200. # index "Database-related commands" "INMISSC=val"
  1201. # index "INMISSC=val"
  1202. INMISSC=val:  Specifies for ASCII-delimited and dBase input files which
  1203. character values are to be considered indicators for missing values.  Defaults
  1204. to INMISSC=NULL.  See also: INMISS=val, OUTMISS=val, and OUTMISSC=val.
  1205.  
  1206. # index "END" "MULTICOLUMN command"
  1207. # index "Database-related commands" "MULTICOLUMN"
  1208. # index "MULTICOLUMN"
  1209. # index "SEPARATOR" "With MULTICOLUMN"
  1210. MULTICOLUMN=n ...  END:  Specifies that a given block is to be arranged in a
  1211. multicolumn format.  The number of columns is specified as "n"; "MULTICOLUMN=2"
  1212. would set up a dual-column output.  The SEPARATOR string appears between each of
  1213. the columns.  (MULTICOLUMN", by the way, can be abbreviated "MULTI" or
  1214. "MULTICOL".)
  1215.  
  1216. # indent 3
  1217. Make sure you put any CENTER or ALIGN or whatever statements after the
  1218. MULTICOLUMN statement (VERBATIM will result in lines being truncated).  Any
  1219. width specification ("MULTICOLUMN=2 WIDTH=80") is used to determine the total
  1220. line width, not the width of each column within the line.  The width of each
  1221. column is the total line width (typically 80) divided by the number of columns
  1222. minus the width of the separator string.
  1223.  
  1224. Otherwise, MULTICOLUMN has the same features that TITLE ...  END has; see that
  1225. discussion.  (Remember, unless provided otherwise, the "END" command is presumed
  1226. to be after the last line of your input file.) See also:  SEPARATOR=string.
  1227. Example:
  1228.  
  1229. # unit verbatim
  1230.         # multicolumn 3 separator=" | "
  1231.         lines
  1232.         lots of lines
  1233.         still more
  1234.         # end
  1235. # end
  1236.  
  1237. # indent 3-3
  1238. # index "Database-related commands" "NULLS"
  1239. # index "NULLS"
  1240. NULLS:  Says that the program will accept values that begin with a decimal
  1241. zero as being a valid value.  Defaults to NULLS.  See also: -NULLS.
  1242.  
  1243. # index "Database-related commands" "-NULLS"
  1244. # index "-NULLS"
  1245. -NULLS:  Says that values which begin with a decimal zero should be treated
  1246. as missing by the program.  Defaults to NULLS.  See also: NULLS.
  1247.  
  1248. # index "filename parameter" "OUTDEF filename parameter"
  1249. # index "Database-related commands" "OUTDEF filename"
  1250. # index "OUTDEF filename"
  1251. # index "Field-definition file"
  1252. OUTDEF filename:  Specifies the field-definition file to create.  Typically, the
  1253. only reason you'd ever use this command is if you want the program to create a
  1254. field-definition file for a dBase input file.  (See the discussion of
  1255. "Field-definition file" later.)  See also:  OUTDEF NULL.
  1256.  
  1257. # index "NULL parameter" "OUTDEF NULL command"
  1258. # index "Database-related commands" "OUTDEF NULL"
  1259. # index "OUTDEF NULL"
  1260. OUTDEF NULL:  Turns off the output field-definition file specification.  See
  1261. also: OUTDEF filename.
  1262.  
  1263. # index "Database-related commands" "-OUTDEF"
  1264. # index "-OUTDEF"
  1265. -OUTDEF:  Same as OUTDEF NULL.
  1266.  
  1267. # index "Database-related commands" "OUTMISS=val"
  1268. # index "OUTMISS=val"
  1269. OUTMISS=val:  Specifies what value will be substituted for missing numeric
  1270. input values on output.  Initially defaults to OUTMISS=NULL.  See also:
  1271. INMISS=val, INMISSC=val, and OUTMISSC=val.
  1272.  
  1273. # index "Database-related commands" "OUTMISSC=val"
  1274. # index "OUTMISSC=val"
  1275. OUTMISSC=val:  Specifies what value will be substituted for missing character
  1276. input values on output.  Initially defaults to OUTMISSC=NULL.  See also:
  1277. INMISS=val, INMISSC=val, and OUTMISS=val.
  1278.  
  1279. # index "Database-related commands" "RESET=string"
  1280. # index "RESET=string"
  1281. RESET=string:  Specifies a character string to stick at the end of the file, to
  1282. reset the printer after the document is printed.  A page eject character (or any
  1283. other user-defined string in the case of PAGEEJECT=string) is typically added
  1284. automatically if /EJECT is specified.  The string can contain special characters
  1285. by using a "\" followed by the three-digit ASCII code for the character.  The
  1286. typical use for this would be to issue a printer reinitialization string.  On a
  1287. Hewlett-Packard printer, this would probably be RESET=\027E.  See also:
  1288. SETUP=string.
  1289.  
  1290. # index "Database-related commands" "SELECT=varspec"
  1291. # index "SELECT=varspec"
  1292. SELECT=varspec:  Specifies which variables or columns should show up in the
  1293. ultimate file.  This allows you to take, for example, a text file and only print
  1294. the middle 10 columns of it or else to take a dBase file and only print certain
  1295. variables.  See the discussion of "Varspecs" later.  See also: SELECT=NULL.
  1296.  
  1297. # index "NULL parameter" "SELECT=NULL command"
  1298. # index "Database-related commands" "SELECT=NULL"
  1299. # index "SELECT=NULL"
  1300. SELECT=NULL:  Specifies that all variables or columns should show up.  This is
  1301. initially the default.  See also: SELECT=varspec.
  1302.  
  1303. # index "Database-related commands" "-SELECT"
  1304. # index "-SELECT"
  1305. -SELECT:  Same thing as SELECT=NULL.
  1306.  
  1307. # index "Database-related commands" "SEPARATOR"
  1308. # index "SEPARATOR"
  1309. SEPARATOR=string:  Specifies the string to appear between columns in a
  1310. multicolumn output.  The string can contain special characters by using a "\"
  1311. followed by the three-digit ASCII code for the character.  For example, to have
  1312. a graphic vertical bar, use SEPARATOR=\032\179\032 or else enter it directly as
  1313. SEPARATOR=" │ ".  Initially defaults to SEPARATOR=" | ".  (In case that reflows
  1314. when you reformat this documentation, that's quote, space, vertical bar, space,
  1315. quote).  See also:  MULTICOLUMN=n.
  1316.  
  1317. # index "Database-related commands" "SETUP=string"
  1318. # index "SETUP=string"
  1319. SETUP=string:  Specifies the character string to strick at the beginning of the
  1320. file, to initialize the printer before the document is printed.  Typically, you
  1321. might use an initialization string that sets the printer in compressed,
  1322. landscape, or whatever mode.  The string can contain special characters by using
  1323. a "\" followed by the three-digit ASCII code for the character.  On a
  1324. Hewlett-Packard printer, this would typically be one of the following codes:
  1325.  
  1326. # unit verbatim
  1327.         SETUP=\027E             (portrait mode, 80 column)
  1328.         SETUP=\027E\027(s16.66H (portrait mode, 132 column)
  1329. # end
  1330.  
  1331. # indent 3
  1332. On an Epson MX dot-matrix printer, you would typically use these codes:
  1333.  
  1334. # unit verbatim
  1335.         SETUP=\015              (portrait mode, 80 column)
  1336.         SETUP=\018              (portrait mode, 132 column)
  1337. # end
  1338.  
  1339. See also: RESET=string.
  1340.  
  1341. # indent 3-3
  1342. # index "Database-related commands" "SORT=varspec"
  1343. # index "SORT=varspec"
  1344. SORT=varspec:  Specifies that the lines which follow should be sorted according
  1345. to a particular group of columns or variables.  See the discussion of "Varspecs"
  1346. later.  Sorting is done based on a case-sensitive search ("Apple" and "Banana"
  1347. will appear before "air").  Note that sorting works well for character strings
  1348. but negative numbers can cause it all sorts of problems.  The sort field
  1349. specification is limited to 50 characters.  Note that you cannot combine sorting
  1350. specifications (for example, descending for some columns and ascending for
  1351. others.) Initially defaults to SORT=NULL.  See also:  SORT=NULL.  Basic sorting
  1352. specifications available here (see each separately):
  1353.  
  1354. # unit verbatim
  1355.         SORT      --> case-sensitive, ascending sort
  1356.         SORTD     --> case-sensitive, descending sort
  1357.         SORTI     --> case-insensitive, ascending sort
  1358.         SORTDI    --> case-insensitive, descending sort
  1359.         SORTID    --> case-insensitive, descending sort
  1360. # end
  1361.  
  1362. # index "NULL parameter" "SORT=NULL command"
  1363. # index "Database-related commands" "SORT=NULL"
  1364. # index "SORT=NULL"
  1365. SORT=NULL:  Turns off any sorting specification.  This statement is vital if you
  1366. have any text appearing after a sorted section.  Remember, you cannot have
  1367. multiple sorting specifications going on so this is the same as all of the
  1368. following:  -SORT, -SORTI, -SORTD, -SORTID, -SORTDI, SORTI=NULL, SORTD=NULL,
  1369. SORTDI=NULL, and SORTID=NULL.  This statement is initially the default.
  1370.  
  1371. # index "Database-related commands" "-SORT"
  1372. # index "-SORT"
  1373. -SORT:  Same as SORT=NULL.
  1374.  
  1375. # index "Database-related commands" "SORTD=varspec"
  1376. # index "SORTD=varspec"
  1377. SORTD=varspec:  Similar to SORT=varspec but sorting is done in descending
  1378. sequence.  See SORT=varspec and SORT=NULL.
  1379.  
  1380. # index "NULL parameter" "SORTD=NULL command"
  1381. # index "Database-related commands" "SORTD=NULL"
  1382. # index "SORTD=NULL"
  1383. SORTD=NULL:  Same as SORT=NULL.
  1384.  
  1385. # index "Database-related commands" "-SORTD"
  1386. # index "-SORTD"
  1387. -SORTD:  Same as SORT=NULL.
  1388.  
  1389. # index "Database-related commands" "SORTDI=varspec"
  1390. # index "SORTDI=varspec"
  1391. SORTDI=varspec:  Similar to SORT=varspec but sorting is done in descending
  1392. sequence and sorting is case insensitive.  Identical to SORTID=varspec.  See
  1393. SORT=varspec and SORT=NULL.
  1394.  
  1395. # index "NULL parameter" "SORTDI=NULL command"
  1396. # index "Database-related commands" "SORTDI=NULL"
  1397. # index "SORTDI=NULL"
  1398. SORTDI=NULL:  Same as SORT=NULL.
  1399.  
  1400. # index "Database-related commands" "-SORTDI"
  1401. # index "-SORTDI"
  1402. -SORTDI:  Same as SORT=NULL.
  1403.  
  1404. # index "Database-related commands" "SORTI=varspec"
  1405. # index "SORTI=varspec"
  1406. SORTI=varspec:  Same as SORT=varspec except the sorting is done in a
  1407. case-insensitive manner ("big" shows up between "Apple" and "Caramel").  See
  1408. SORT=varspec and SORT=NULL.
  1409.  
  1410. # index "NULL parameter" "SORTI=NULL command"
  1411. # index "Database-related commands" "SORTI=NULL"
  1412. # index "SORTI=NULL"
  1413. SORTI=NULL:  Same as SORT=NULL.
  1414.  
  1415. # index "Database-related commands" "-SORTI"
  1416. # index "-SORTI"
  1417. -SORTI:  Same as SORT=NULL.
  1418.  
  1419. # index "Database-related commands" "SORTID=varspec"
  1420. # index "SORTID=varspec"
  1421. SORTID=varspec:  Same as SORTDI=varspec.
  1422.  
  1423. # index "NULL parameter" "SORTID=NULL command"
  1424. # index "Database-related commands" "SORTID=NULL"
  1425. # index "SORTID=NULL"
  1426. SORTID=NULL:  Same as SORT=NULL.
  1427.  
  1428. # index "Database-related commands" "-SORTID"
  1429. # index "-SORTID"
  1430. -SORTID:  Same as SORT=NULL.
  1431.  
  1432. # index "Database-related commands" "SUM"
  1433. # index "Adding Columns Of Numbers" "(See SUM)" DUMMY
  1434. # index "SUM"
  1435. SUM=varspec:  Summarizes a group of numbers and presents the total after the
  1436. items are displayed.  Initially defaults to SUM=NULL.  See also:  SUM=NULL.
  1437.  
  1438. # indent 3
  1439. An example of summing might be like the following:
  1440.  
  1441. # unit verbatim
  1442.   # from fixed
  1443.   # sort=28-34
  1444.   # sum=28-34,43-49,57-62,73-78
  1445.    370 DISK STORAGE           $75.14         $35.58       $23.28          $49.16
  1446.    370 DISK STORAGE           $12.80          $6.26        $6.24          $12.76
  1447.    370 DISK STORAGE            $0.00          $0.00        $0.00           $0.00
  1448.    370 DISK STORAGE            $0.00          $0.00       $11.38          $22.76
  1449.    370 DISK STORAGE           $61.56         $29.64       $11.40          $23.68
  1450.    370 DISK STORAGE            $0.00          $0.00        $0.00           $0.00
  1451.    370 DISK STORAGE            $0.72          $0.13        $0.13           $0.72
  1452.    370 DISK STORAGE            $1.99          $0.13        $1.64          $16.40
  1453.    370 DISK STORAGE            $0.00          $0.00        $0.00           $0.00
  1454.    370 DISK STORAGE            $0.27          $0.13        $0.13           $0.27
  1455.    370 DISK STORAGE            $0.00          $0.00        $0.00           $0.00
  1456.    370 DISK STORAGE          $195.48         $94.12       $39.28          $81.58
  1457.    370 DISK STORAGE            $0.00          $0.00        $0.00           $0.00
  1458.    370 DISK STORAGE          $130.01         $90.84       $24.99          $35.77
  1459.    370 DISK STORAGE            $8.10          $3.90        $2.62           $5.44
  1460.   # -sum
  1461. # end
  1462.  
  1463. This will sort the 15 lines and summarize the four columns of numbers.
  1464.  
  1465. # indent 3-3
  1466. # index "NULL parameter" "SUM=NULL command"
  1467. # index "Database-related commands" "SUM=NULL"
  1468. # index "SUM=NULL"
  1469. SUM=NULL:  Turns off summarization.
  1470.  
  1471. # index "Database-related commands" "-SUM"
  1472. # index "-SUM"
  1473. -SUM:  Same as SUM=NULL.
  1474.  
  1475. #
  1476. # indent 0
  1477. # index "Control codes"
  1478. # index "Page numbers"
  1479. # index "Date-stamps"
  1480. # index "Time-stamps"
  1481. # index "Column headers"
  1482. # index "Titles"
  1483. # index "^B"
  1484. # index "^D"
  1485. # index "^T"
  1486. # index "^N"
  1487. # index "^A"
  1488. # index "^I"
  1489. # index "^H"
  1490. # index "^O"
  1491. # index "%n%"
  1492. Control codes:
  1493.  
  1494. Within titles, headers, and footers, you can embed the following codes.  These
  1495. codes are case-sensitive; "^b^" will not translated as the current page number.
  1496. These codes will be expanded on output:
  1497.  
  1498.         ^B      current page number
  1499.         ^D      pagination date (in mm/dd/yy or appropriate country format, or
  1500.                 in whatever your DATE marker has set)
  1501.         ^T      pagination time (in hh:mm format)
  1502.         ^N      name of the input file (without drive or path information)
  1503.         ^A      input file's creation date (in mm/dd/yy or appropriate country
  1504.                 format, or in whatever your DATE marker has set)
  1505.         ^I      input file's creation time (in hh:mm format)
  1506.         ^H      column headers (when appropriate)
  1507.         ^O      output file's name (without drive or path information)
  1508.  
  1509. You can also immediately follow any of the control codes with a field width by
  1510. including one or two digits within two percentage signs.  For example, "^O%12%"
  1511. will force the output file's name to be 12 characters in length.  This is useful
  1512. for making sure that the headers are all a uniform length, something which would
  1513. otherwise be complicated because the length of the page number can vary.
  1514.  
  1515. Without using the length codes, formatting commands like centering will be
  1516. adjusted based on the replacement contents for these codes.  A line containing a
  1517. one-digit page number will be centered differently than the exact same line
  1518. containing a three-digit page number.
  1519.  
  1520. Example:
  1521.  
  1522.         # title center width 80
  1523.         File ^N listing, page ^B
  1524.  
  1525.         # end
  1526.  
  1527. or
  1528.  
  1529.         # title center width 80
  1530.         ^O%12%                         ^B%3%                       Revised: ^A
  1531.  
  1532.         # end
  1533.  
  1534. Date formats are based on your appropriate country date format although you
  1535. can override this by using the DATE marker command.  See the discussion on
  1536. "date display" later for information on date formats.
  1537.  
  1538. #
  1539. # index "Varspecs"
  1540. # index "Specifying columns"
  1541. # index "Specifying variables"
  1542. # index "Columns" "Specifying"
  1543. Varspecs:
  1544.  
  1545. Several of the commands (for example, SELECT and SORT) expect you to pass in a
  1546. "varspec" parameter.  Varspec's indicate which variables or columns to process.
  1547.  
  1548. The format for the varspec is:
  1549.  
  1550.         n[-n] [ , n-[n] ]...
  1551.  
  1552. where "n" is a single variable/column.  "n-n" indicates you want a range of
  1553. variables/columns.
  1554.  
  1555. For FROM ASCII or FROM DBF, the "n" corresponds to a variable number.  For FROM
  1556. FIXED, the "n" corresponds to a physical one-byte column.  For example:
  1557.  
  1558.         # from ascii
  1559.         # select 1,3
  1560.         "Testing",2,4
  1561.         "All",5,7
  1562.         "This",1,6
  1563.  
  1564. says to display the 1st and 3rd variables and results in something like this:
  1565.  
  1566.         Testing  4
  1567.         All      7
  1568.         This     6
  1569.  
  1570. On the other hand, if you're processing fixed-fielded data, the varspec will
  1571. select individual columns.  So:
  1572.  
  1573.         # from fixed
  1574.         # select 1-10,15
  1575.         1234567_10_2345678
  1576.         Testing   abcdefgh
  1577.         All       abcdefgh
  1578.         This      abcdefgh
  1579.  
  1580. will come out like this:
  1581.  
  1582.         Testing   e
  1583.         All       e
  1584.         This      e
  1585.  
  1586. #
  1587. # index "Field-definition file"
  1588. # index "ASCII-delimited files"
  1589. # index "dBase files"
  1590. Field-definition file:
  1591.  
  1592. For data files (ASCII-delimited, dBase, and fixed field input files), you can
  1593. use PAGINATE.EXE to present a reasonably formatted listing of variables.  Unless
  1594. you are reading a dBase file, this program requires a field-definition file to
  1595. figure out the characteristics for each field and also to set certain file
  1596. characteristics.  If you're processing an ASCII-delimited input file, the
  1597. routine can try to create a field-definition file for you if desired.
  1598.  
  1599. The definition file can be created with any text editor.  The definition file
  1600. consists of several records with the following fields separated by spaces.
  1601. Except for the record type indicator (which must begin in column 1), all other
  1602. fields can be placed in any columns:
  1603.  
  1604.         (1) record type (see below)
  1605.         (2) length of field on input
  1606.         (3) number of decimal places for numeric data (if you don't know,
  1607.             put a "?" here; for non-numeric data, a "0" is fine) on output
  1608.         (4) length of field on output
  1609.  
  1610. Any characters after the field length are treated as comment fields.  You would
  1611. typically use this to enter the field name or column position or any other
  1612. information of use to you.
  1613.  
  1614. The data record types accepted by this routine are as follows:
  1615.  
  1616.         type C = character data (leading spaces are trimmed)
  1617.              V = verbatim character data (no leading spaces are trimmed)
  1618.              N = numeric
  1619.              L = logical (T or F)
  1620.              D = date (in yyyymmdd format)
  1621.              M = memo fields (only for dBase input files; ignored on output)
  1622.  
  1623. The data fields should be in the order the fields are found in the source file.
  1624.  
  1625. Note that for fixed field files, you have to account for every byte in the file.
  1626. If you have something like this:
  1627.  
  1628.         12345678_1_2345678_2_2345678_3      (column positions)
  1629.         APPLE    X Y    12 BANANAS
  1630.  
  1631. Even though you may think you only have five fields, the following .DEF file
  1632. will NOT work:
  1633.  
  1634.         ; Bad .DEF file:  Note does not account for blank spaces
  1635.         C   8 0   8 Fruit1
  1636.         C   1 0   1 Class1
  1637.         C   1 0   1 Class2
  1638.         N   5 0   5 Value
  1639.         C  11 0  11 Fruit2
  1640.  
  1641. #
  1642. You may want the Fruit1 field to be in columns 1 through 8 and Class1 to be in
  1643. column 10 but the routine will not know to skip column 9 so it will start
  1644. reading Class1 beginning in column 9, Class2 beginning in column 10, etc.  To
  1645. drop the blank positions, you have to add dummy fields on input and ask for them
  1646. to be dropped on output:
  1647.  
  1648.         ; Good .DEF file:  Spaces between fields are accounted for
  1649.         C   8 0   8 Fruit1
  1650.         C   1 0   0 Filler
  1651.         C   1 0   1 Class1
  1652.         C   1 0   0 Filler
  1653.         C   1 0   1 Class2
  1654.         C   1 0   0 Filler
  1655.         N   5 0   5 Value
  1656.         C   1 0   0 Filler
  1657.         C  11 0  11 Fruit2
  1658.  
  1659. You can also use the input field length and output field lengths to either drop
  1660. fields using other formats (by specifying a zero length for the output field
  1661. length) or for creating fields on output (by specifying a zero length for the
  1662. input field length).  You can also use this to expand on contract a field.  For
  1663. example, if Fruit1 is 8 characters long but you only want it to occupy 4
  1664. characters on output (thus the field would be truncated), specify 8 for the
  1665. input field length and 4 for the output field length.
  1666.  
  1667. If the output field length is wider than the input field length, the data values
  1668. will be shifted right or left depending on the data type.  In general, numeric
  1669. fields are shifted right (so extra spaces show up in front of the number) and
  1670. all other field types (character, logical, or date) are shifted left.
  1671.  
  1672.  
  1673. #
  1674. # index "Parameters" "Specifying"
  1675. # index "INI file"
  1676. # index "SET PAGINATE environmental variable"
  1677. # index "Marker commands" "From the command line"
  1678. Specifying parameters:
  1679.  
  1680. Parameters for this program can be set in the following ways.  The last setting
  1681. encountered always wins:
  1682.   - Read from an *.INI file (see BRUCEINI.DOC file),
  1683.   - Through the use of an environmental variable (SET PAGINATE=whatever), or
  1684.   - From the command line (see "Syntax" below)
  1685.  
  1686. In most cases, the marker commands themselves can be passed in at the command
  1687. line or through one of the other methods specified above.  The only difference
  1688. is that the marker commands then begin with "/" instead of (by default) "#".
  1689. Some marker commands (like TITLE ... END) don't make sense in the command line.
  1690.  
  1691.  
  1692. # index "Character-translation file"
  1693. # index "/Linitfile parameter"
  1694. # index "Graphics characters" "Removing"
  1695. # index "Non-printable characters" "Removing"
  1696. # index "Characters" "Removing"
  1697. # index "(NONE) replacement"
  1698. # index "/Iinitfile parameter"
  1699. Character-translation file:
  1700.  
  1701. PAGINATE will process a character-translation (lookup) table if one is found.
  1702. This table can be in your standard *.INI file (for example, PAGINATE.INI) if
  1703. desired or it can be a separate file specified using the /Linitfile parameter.
  1704.  
  1705. This table allows you to replace all instances of one character in your input
  1706. file with another when you write the file out.
  1707.  
  1708. What would you use this for?  Your document might contain characters like
  1709. graphic characters.  You might have problems if you wanted to e-mail this
  1710. document to someone or print it on a printer than didn't recognize the
  1711. characters.
  1712.  
  1713. #
  1714. For example, something like:
  1715.  
  1716. # unit verbatim
  1717.          ┌─┬─┐   ╔═╦═╗
  1718.          │ │ │   ║ ║ ║
  1719.          ├─┼─┤   ╠═╬═╣
  1720.          │ │ │   ║ ║ ║
  1721.          └─┴─┘   ╚═╩═╝
  1722. # end
  1723.  
  1724. looks great on the screen but it might print out horribly.
  1725.  
  1726. If you want, you can tell PAGINATE to do a one-for-one character replacement on
  1727. any characters.  This is done through the character-translation file.  This
  1728. file, which can be embedded in the standard PAGINATE.INI file, consists of a
  1729. series of lines in the following format:
  1730.  
  1731.         inchar = outchar
  1732.  
  1733. where "inchar" is the character to change from and "outchar" is what to change
  1734. the character to.  Both portions can consist of regular non-space ASCII text
  1735. characters (like "A" or "z") as well as hexadecimal values (in the form &Hxx) or
  1736. decimal values (in the form \nnn).  (See the BRUCEHEX.DOC file.) To remove a
  1737. character entirely, assign it the value of (NONE).  You cannot use a space or
  1738. equal sign in either "inchar" or "outchar"; use the hexadecimal or decimal
  1739. representations instead.  The table does not have to be in any specified order.
  1740. Lines can end with "/*" followed by a comment if you want.  Examples:
  1741.  
  1742.         \186 = |     /* ║ becomes |
  1743.         \205 = -     /* ═ becomes -
  1744.         \206 = +     /* ╬ becomes +
  1745.         \027 = (NONE)  /* Remove excape characters entirely
  1746.  
  1747. Since lines beginning with "/" are treated as command-line defaults, you must
  1748. use \047 or &H2F if you want to override the definition of "/".
  1749.  
  1750. NOTE:  If a character-translation file is specified, all instances of Alt-0
  1751. will be removed from the resulting file.  (This is how the program
  1752. handles replacements with (NONE)).  Redefine \000 as \032 or something if you
  1753. want to keep them.
  1754.  
  1755. # index "Alt-255 key" "Removing"
  1756. Note that Alt-255 is automatically translated to Alt-32 (regular space)
  1757. even if character-translation table is used.  Alt-255 is used internally by
  1758. the program to handle things like bullets and such.  It is also the recommended
  1759. character to use to avoid certain combinations of words from wrapping.
  1760.  
  1761. Blank lines or those beginning with the following are ignored as comments:
  1762.  
  1763.         ;    (semi-colon)
  1764.         :    (colon)
  1765.         '    (quote)
  1766.  
  1767. # index "PAGNOASC.INI"
  1768. The lookup tables can also be read from a different table specified by the
  1769. /Linitfile parameter.  Use the enclosed PAGNOASC.INI as your lookup file if you
  1770. want to remove all non-standard characters from your file.  Modify as necessary.
  1771.  
  1772.  
  1773. #
  1774. # Index "Date displays"
  1775. # index "Date-stamps" "Formatting"
  1776. Date displays:
  1777.  
  1778. The characters that can be used in the output format include the following
  1779. special characters (from the VB/DOS on-line help):
  1780.  
  1781. # unit verbatim
  1782.         Symbol   Description
  1783.         ══════   ════════════════════════════════════════════════════════
  1784.         d        Display the day as a number without leading zeros (1-31)
  1785.         dd       Display the day as a number with leading zeros (01-31)
  1786.         ddd      Display the day as an abbreviation (Sun-Sat)
  1787.         dddd     Display the day as a full name (Sunday-Saturday)
  1788.         ddddd    Display a serial date number as a complete date
  1789.                  (including day, month, and year)
  1790.  
  1791.         m        Display the month as a number without leading zeros (1-12);
  1792.                  if used immediately following h or hh, the minute rather
  1793.                  than the month is displayed
  1794.         mm       Display the month as a number with leading zeros (01-12);
  1795.                  if used immediately following h or hh, the minute rather
  1796.                  than the month is displayed
  1797.         mmm      Display the month as an abbreviation (Jan-Dec)
  1798.         mmmm     Display the month as a full name (January-December)
  1799.  
  1800.         yy       Display the year as a two-digit number (00-99)
  1801.         yyyy     Display the year as a four-digit number (1900-2040)
  1802. # end
  1803.  
  1804. You can embed other characters like punctuation in the format string as well.
  1805. For example, if today is September 12, 1996, the following DATE=string
  1806. specifications yield the following results:
  1807.  
  1808. # unit verbatim
  1809.         DATE="mm/dd/yy"        yields    09/12/96
  1810.         DATE="mmm_dd,_yyyy"    yields    Sep 12, 1996
  1811. # end
  1812.  
  1813. The program does not actually verify your DATE=string specification and you may
  1814. get a run-time error if you specify it incorrectly.
  1815.  
  1816.  
  1817. #
  1818. # index "Examples"
  1819. # index "Directories" "Multicolumn"
  1820. # index "Formatting commands" "MARKER=c" "Example"
  1821. # index "MARKER=c" "Example"
  1822. Examples:
  1823.  
  1824. This section adds some examples of how you can use PAGINATE.  I'll add to it
  1825. over time.
  1826.  
  1827. Multicolumn Directories:  You want to generate a multicolumn listing of
  1828. directories which are sorted going down the page instead of across the page
  1829. like "DIR /W" does.  PAGINATE can handle this fairly easily.
  1830.  
  1831. Create a control file called C:\DIRW.CTL with these statements (the SETUP and
  1832. RESET statements work for Hewlett-Packard printers to put you into compressed
  1833. mode):
  1834.  
  1835.         #WIDTH 132
  1836.         #SETUP "\027E"
  1837.         #RESET "\027E\027(s16.66H"
  1838.         #MULTICOLUMN 7
  1839.         #MARKER=*
  1840.  
  1841. If you don't want it to be in a compressed mode, use the following control file:
  1842.  
  1843.         #WIDTH 80
  1844.         #MULTICOLUMN 5
  1845.         #MARKER=*
  1846.  
  1847. (The #MARKER=* is in there because a number of shareware companies have
  1848. gotten into using weird characters as the first letter of the file name to
  1849. make sure the file sorts higher in an alphabetical list.  Several programs
  1850. may begin with a pound sign but none can begin with an asterisk.)  Then create a
  1851. batch file called DIRW.BAT:
  1852.  
  1853.         DIR /ON > TEMP.TXT
  1854.         PAGINATE TEMP.TXT TEMP.OUT /CC:\DIRW.CTL /OVERWRITE
  1855.         DEL TEMP.TXT
  1856.  
  1857. This will route your directory to a disk file and rewrite it as TEMP.OUT in a
  1858. multicolumn format with printer controls.
  1859.  
  1860.  
  1861. # index "Windows" "Long-line files"
  1862. # index "Lines" "Wrapping long ones"
  1863. # index "Notepad" "Converting from"
  1864. Those long-line things you get from writing out the file from Windows:  You've
  1865. done this.  You ask for a text file.  They've created it using the Windows
  1866. notepad.  You look at it and the lines scroll endlessly--one line per paragraph.
  1867. How are you supposed to print that?!
  1868.  
  1869. Simple.  Let's say the file name is NOTEPAD.TXT.  Just issue the following
  1870. command:
  1871.  
  1872.         PAGINATE NOTEPAD.TXT /ALIGN /WIDTH=80
  1873.  
  1874.  
  1875. #
  1876. # index "Syntax"
  1877. Syntax:
  1878.  
  1879. # unit verbatim
  1880.     PAGINATE [ filespec | (filelist) | @listfile ] [ outfile ] [ /Cctlfile ]
  1881.       [ /DEBUG ] [ /OVERWRITE | /APPEND | /-OVERWRITE | /OVERASK ]
  1882.       [ /marker command ]...
  1883.       [ /EXT=.xxx ] [ /P ] [ /BEEP ] [ /Linitfile ]
  1884.       [ /MONO ] [ /Iinitfile | /-I ] [ /-ENV ] [ /? ] [ /?&H ]
  1885. # end
  1886.  
  1887. where:
  1888.  
  1889. # index "Filespec parameter"
  1890. # index "Files" "Input"
  1891. "filespec" tells the routine which file or files are to be processed.  It can
  1892. include path information if desired.  It can also include standard DOS wildcards
  1893. as long as an output file is not specified.  The input files can contain INCLUDE
  1894. statements to add in other files to process.  If no input specification
  1895. (filespec or @listfile) is provided, you'll be prompted for one.
  1896.  
  1897. # index "(filelist) parameter"
  1898. # index "Files" "Input"
  1899. "(filelist)" allows you to specify multiple files to be processed from the
  1900. command line.  File names should be separated by spaces.  They may include
  1901. drive, path, and wildcard information.  Remember that a command line in DOS
  1902. cannot exceed 127 characters so you're limited as to how many different file
  1903. specifications you can provide in this fashion.
  1904.  
  1905. # index "@listfile parameter"
  1906. # index "Files" "Input"
  1907. "@listfile" allows you to have a variety of file specifications saved in a text
  1908. file named "listfile".  Each line in the file should consist of one file
  1909. specification, each of which can include a path and wildcards if desired.  Blank
  1910. lines and lines beginning with semi-colons, colons, or quotes are ignored.  If
  1911. no input specification (filespec or @listfile) is provided, you'll be prompted
  1912. for one.
  1913.  
  1914. # index "Outfile parameter"
  1915. "outfile" specifies the name of the output file that is to contain the resulting
  1916. text.  By default, the output file name will be the name of the input file with
  1917. a .PAG extension.  (The default .PAG extension can be overridden using the
  1918. "/EXT=.xxx" parameter.)
  1919.  
  1920. # index "Ctlfile parameter"
  1921. # index "/Cctlfile parameter"
  1922. "/Cctlfile" is basically the same thing as the infile but it typically contains
  1923. only marker commands.  For example, you might have a straight text file
  1924. contained in "infile" and then use the "ctlfile" to say how that text file
  1925. should be processed.
  1926.  
  1927. # index "/DEBUG parameter"
  1928. "/DEBUG" is used for debugging purposes.  You might use it when you get an
  1929. error message that doesn't clearly tell you where the error occurred.  /DEBUG
  1930. will show you the text as it's processed and let you see what's actually being
  1931. processed and written.
  1932.  
  1933. # index "/OVERWRITE parameter"
  1934. "/OVERWRITE" says to overwrite the output file if it exists already.
  1935.  
  1936. # index "/-OVERWRITE parameter"
  1937. "/-OVERWRITE" says to abort if the output file exists already.
  1938.  
  1939. # index "/APPEND parameter"
  1940. "/APPEND" says to append (add) to the output file if it exists already.  This
  1941. option is only available if you're creating either a fixed-field or ASCII-
  1942. delimited output file.
  1943.  
  1944. # index "/OVERASK parameter"
  1945. "/OVERASK" says to ask if the output file exists already.  This is initially
  1946. the default.
  1947.  
  1948. #
  1949. "/marker command" allows you to specify one or more marker commands.  These are
  1950. spelled out in this documentation.  Note that not all marker commands can appear
  1951. in the command line whereas all marker commands can instead be embedded in
  1952. either the control file or the document itself.
  1953.  
  1954. # index "/EXT=.xxx parameter"
  1955. "/EXT=.xxx" allows you to specify a different default file extension for the
  1956. output file.  This parameter only matters if you do not explicitly specify an
  1957. output file name.  The default value is "/EXT=.PAG".
  1958.  
  1959. # index "/PAUSE parameter"
  1960. # index "/P parameter"
  1961. "/P" (or "/PAUSE") waits for you to press ENTER if there is a compilation error
  1962. and then returns you to DOS.  This is useful if you're using PAGINATE to process
  1963. a whole series of files.  The default value is "/-P" ("/-PAUSE").
  1964.  
  1965. # index "/-PAUSE parameter"
  1966. # index "/-P parameter"
  1967. "/-P" (or "/-PAUSE") says to return to DOS without prompting you if there is a
  1968. compilation error.  This is initially the default.
  1969.  
  1970. # index "/BEEP parameter"
  1971. "/BEEP" says to sound a tone when the program is finished executing.  The
  1972. default value is "/-BEEP".
  1973.  
  1974. # index "/-BEEP parameter"
  1975. "/-BEEP" says to not sound a tone when the program finishes.  This is initially
  1976. the default.
  1977.  
  1978. # index "/Linitfile parameter"
  1979. "/Linitfile" says that the "Character-translation table" codes are found in a
  1980. file other than from the default "/Iinitfile" file.  This is primarily useful if
  1981. you want to have a master *.INI file and a separate code lookup table.
  1982. PAGNOASC.INI is provided as one sample character-translation table.  It removes
  1983. all graphics and other possibly non-printable characters from the output file.
  1984.  
  1985. # index "/MONO parameter"
  1986. # index "/-COLOR parameter"
  1987. "/MONO" (or "/-COLOR") does not try to override screen colors.  Initially
  1988. defaults to "/COLOR".
  1989.  
  1990. # index "/COLOR parameter"
  1991. # index "/-MONO" parameter"
  1992. "/COLOR" (or "/-MONO") allows screen colors to be overridden.  This is initially
  1993. the default.
  1994.  
  1995. # index "/Iinitfile parameter"
  1996. "/Iinitfile" says to read an initialization file with the file name "initfile".
  1997. The file specification *must* contain a period.  Initfiles are described in the
  1998. BRUCEINI.DOC file.  Initially defaults to "/IPAGINATE.INI".
  1999.  
  2000. # index "/-I parameter"
  2001. # index "/INULL parameter"
  2002. "/-I" (or "/INULL") says to skip loading the initialization file.
  2003.  
  2004. # index "/ENV parameter"
  2005. "/ENV" says to look for %var% occurrences in the command line and try to
  2006. resolve any apparent environmental variable references.  See BRUCEINI.DOC for
  2007. more information.  This is initially the default.
  2008.  
  2009. # index "/-ENV parameter"
  2010. "/-ENV" says to skip resolving apparent %var% occurrences in the command line.
  2011. Initially defaults to "/ENV".
  2012.  
  2013. # index "/? parameter"
  2014. "/?" or "/HELP" or "HELP" shows you the syntax for the command.
  2015.  
  2016. # index "/?&H parameter"
  2017. "/?&H" gives you a hexadecimal and decimal conversion table.
  2018.  
  2019.  
  2020. #
  2021. # index "Return codes"
  2022. # index "ERRORLEVEL codes"
  2023. Return codes:
  2024.  
  2025. PAGINATE returns the following ERRORLEVEL codes:
  2026.  
  2027.         0 = no problems
  2028.       254 = errors encountered in processing input files
  2029.       255 = syntax problems or /? requested
  2030.  
  2031.  
  2032. # index "Guthrie, Bruce"
  2033. # index "Wayne Software"
  2034. # index "WayneSof@erols.com"
  2035. # index "e-mail contact"
  2036. # index "Author"
  2037. Author:
  2038.  
  2039. This program was written by Bruce Guthrie of Wayne Software.  It is free for use
  2040. and redistribution provided relevant documentation is kept with the program, no
  2041. changes are made to the program or documentation, and it is not bundled with
  2042. commercial programs or charged for separately.  People who need to bundle it in
  2043. for-sale packages must pay a $50 registration fee to "Wayne Software" at the
  2044. following address.
  2045.  
  2046. Additional information about this and other Wayne Software programs can be found
  2047. in the file BRUCE.DOC which should be included in the original ZIP file.  The
  2048. recent change history for this and the other programs is provided in the
  2049. HISTORY.ymm file which should be in the same ZIP file where "y" is replaced by
  2050. the last digit of the year and "mm" is the two digit month of the release;
  2051. HISTORY.611 came out in November 1996.  This same naming convention is used in
  2052. naming the ZIP file (PAGINymm.ZIP) that this program was included in.
  2053.  
  2054. Comments and suggestions can also be sent to:
  2055.  
  2056.                 Bruce Guthrie
  2057.                 Wayne Software
  2058.                 113 Sheffield St.
  2059.                 Silver Spring, MD 20910
  2060.  
  2061.                 e-mail: WayneSof@erols.com   fax: (301) 588-8986
  2062.                 http://www.geocities.com/SiliconValley/Lakes/2414
  2063.  
  2064. Please provide an Internet e-mail address on all correspondence.
  2065.  
  2066. # title center width=79
  2067. Index                                  ^B%3%                         ^A
  2068.  
  2069. # end
  2070. #
  2071. # multicolumn 2
  2072. # include index
  2073. # end
  2074.